<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="5shop.css" />
	</head>
	<body>
		<div id="header-">
			<div id="header">
				<div class="left"><img src="./img/home_logo.png"></div>
				<div class="right"><span class="number">我的购物袋</span><span>></span> <a href="">填写和提交订单信息
						<span>></span>成功提交订单</a></div>

			</div>
		</div>

		<div id="body">
			<a href="">我的购物袋(1)</a><button type="button" class="allprice">立即结算</button>

			<table border="1px" cellspacing="0" cellpadding="0">
				<tbody class="tBody">
					<tr>
						<td><input type="checkbox" name="" id="" class="chexkbox" />全选</td>
						<td>商品信息</td>
						<td>单价</td>
						<td>数量</td>
						<td>小计</td>
						<td>操作</td>
					</tr>
					<tr>
						<td class="chexkboxone">
							<!-- <input type="checkbox" name="" id=""   class="chexkbox" value="" /> --><img
								src="img/37.jpg">
						</td>

						<td>黛珂 植物欣韵三部曲<br>套组容量 滋润型</td>
						<td>
							<span class="goods-price">￥920.00</span>
						</td>
						<td>
							<button type="button" class="reduce">-</button>
							<button type="button" class="goods-num">0</button>
							<button type="button" class="add">+</button>
						</td>
						<td>
							小计:<span class="small">0</span>
						</td>
						<td>
							<input type="button" class="dele" id="" value="删除" />
						</td>

					</tr>
					<tr>
						<td class="chexkboxone">
							<!-- <input type="checkbox" name="" id=""   class="chexkbox" value="" /> --><img
								src="img/37.jpg">
						</td>

						<td>黛珂 植物欣韵三部曲<br>套组容量 滋润型</td>
						<td>
							<span class="goods-price">￥920.00</span>
						</td>
						<td>
							<button type="button" class="reduce">-</button>
							<button type="button" class="goods-num">12</button>
							<button type="button" class="add">+</button>
						</td>
						<td>
							小计:<span class="small">0</span>
						</td>
						<td>
							<input type="button" class="dele" id="" value="删除" />
						</td>

					</tr>

				</tbody>
				<tfoot>
					<tr>
						<td colspan="5">一共<span class="goodsall-num">0</span>件商品, 共计花费<span
								class="goodsall-price">0</span>元。
						</td>

					</tr>
				</tfoot>

			</table>
		</div>
		<div id="foot-">
			<div id="foot">
				© 高丝化妆品销售&nbsp;&nbsp;&nbsp;（中国）&nbsp;有限公司版权所有 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;沪ICP备09002279号-17<svg
					class="icon" aria-hidden="true">
					<use xlink:href="#icon-guohui"></use>
				</svg>公网安备 31010902002154号
				<br>
				国家药监局提示您：&nbsp;请正确认识化妆品功效，&nbsp;&nbsp;化妆品不能替代药品，&nbsp;&nbsp;不能治疗皮肤病等疾病
			</div>
		</div>

	</body>
</html>
<script src="5shop.js" type="text/javascript" charset="utf-8"></script>
<script src="jquery.js" type="text/javascript" charset="utf-8"></script>
<script src="font_2734701_hw7r7uo4u1i/iconfont.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
// 点击减号时
$(".reduce").eq(1).click(
	function fun1() {
		if ($(".goods-num").html() > 0) {
			console.log($(".goods-num").html())
			// 货物数量-1
			$(".goods-num").html() = $(".goods-num").html() - 1;
			// 小计变化
			$(".small").html() = $(".goods-num").html() * $(".goods-price").html()
			// 货物的总数量变化
			let a=$(".goods-num").html()
			for (let i = 0; i <a ; i++) {
				$(".goodsall-num") += a
			}
			// 货物总价格变化
			for (let i = 0; i < $(".small").html(); i++) {
				$(".goodsall-price") += $(".small").html()
			}

		}
	}
	fun1()
)

</script>
